const express  = require('express');
const path = require('path');

let app = express();

app.listen(8080,() => {
    console.log('====>>>>','express running.......');
})

app.use(express.static(path.join(__dirname, 'static')))

app.get('/index',(req,res) => {
    res.sendFile(path.join(__dirname, 'static','post.html'));
})

app.get('/search',(req,res) => {
    res.send('https://www.baidu.com/');
})